import { _decorator, Component, Label, Node, tween, v3, Vec3, Widget } from 'cc';
import { Clips } from './Enums';
import { AudioMgr } from './AudioMgr';
import { Global } from './Global';
import { Tools } from './Tools';
import { gameMgr } from '../gameMgr';
const { ccclass, property } = _decorator;

@ccclass('TipsAction')
export class TipsAction extends Component {
    
   @property(Label)
   msg:Label = null;

    start() {
        
    }

    on_open(str:string = null){
        if(str)
            this.msg.string = str;

        Tools.updateWidget(this.node);

    }

    on_close(){
        this.node.getComponent(Widget).enabled = false;
        this.node.setPosition(v3(1800 , 0 , 0 ));

        gameMgr.Inst.on_goto_Home();
    }
}

